﻿using System;
using System.Reflection;

namespace Ue.Aop.Fody.Samples.Methods
{
    public abstract class MethodDecoratorBase : Attribute, IMethodDecorator
    {
        public object Sender { get; protected set; }

        public MethodBase Method { get; protected set; }

        public object ReturnValue { get; protected set; }

        public Exception Exception { get; protected set; }

        public abstract void OnEntry(object sender, MethodBase method);

        public abstract void OnExit(object sender, MethodBase method, object returnValue);

        public abstract void OnException(object sender, MethodBase method, Exception exception);
    }
}
